home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / SASETUP.MSI / F77560_sh_resourcepanel.asp < prev    next >
Encoding:
Text File  |  2003-02-21  |  4.2 KB  |  145 lines

  1. <%    '==================================================
  2.     ' Microsoft Server Appliance
  3.     ' Resource Viewer page
  4.     ' Copyright (c) Microsoft Corporation.  All rights reserved.
  5.     '==================================================%>
  6. <!-- Copyright (c) Microsoft Corporation.  All rights reserved.-->
  7. <!-- #include file="inc_framework.asp" -->
  8. <%
  9.     Dim L_NOSTATUS_MESSAGE
  10.     Dim L_PAGETITLE
  11.  
  12.  
  13.     L_PAGETITLE = Request.QueryString("Title")
  14.     If ( Len(L_PAGETITLE) <= 0 ) Then
  15.         L_PAGETITLE = GetLocString("sacoremsg.dll", "40200BB8", "")
  16.     End If
  17.  
  18.     L_NOSTATUS_MESSAGE = GetLocString("sacoremsg.dll", "40200BB9", "")
  19.     
  20. %>
  21.  
  22. <HTML>
  23. <meta http-equiv="Content-Type" content="text/html; charset=<%=GetCharSet()%>">
  24. <HEAD>
  25. <TITLE><%=L_PAGETITLE%></TITLE>
  26. <meta HTTP-EQUIV="Refresh" CONTENT="60">
  27. <%            
  28.     Call SA_EmitAdditionalStyleSheetReferences("")
  29. %>        
  30. <SCRIPT LANGUAGE="JavaScript" SRC="<%=m_VirtualRoot%>sh_page.js"></SCRIPT>
  31. </HEAD>
  32. <BODY marginWidth="0" marginHeight="0" onDragDrop="return false;" topmargin="0" LEFTMARGIN="0" oncontextmenu="//return false;"> 
  33. <%
  34.     Call ServeResources()
  35. %>
  36. </BODY>
  37. </HTML>
  38.  
  39.  
  40. <%
  41. '----------------------------------------------------------------------------
  42. '
  43. ' Function : ServeResources
  44. '
  45. ' Synopsis : Serves the resources
  46. '
  47. ' Arguments: None
  48. '
  49. ' Returns  : None
  50. '
  51. '----------------------------------------------------------------------------
  52. Function ServeResources 
  53.     Call ServeStandardHeaderBar(L_PAGETITLE, "")
  54.     Response.Write("<div class='PageBodyInnerIndent'>")
  55.     Call ServeElementBlock(Request.QueryString("ResContainer"), L_NOSTATUS_MESSAGE, True, False, False)
  56.     Response.Write("</div>")
  57. End Function
  58.  
  59.  
  60. '----------------------------------------------------------------------------
  61. '
  62. ' Function : ServeElementBlock
  63. '
  64. ' Synopsis : Serves elements belonging to the same container
  65. '
  66. ' Arguments: Container(IN) -  container whose elements need to be served
  67. '            EmptyMsg(IN)  -  Msg to display if no elements are found
  68. '            Icons(IN)     -  Should icons be displayed with text
  69. '            Links(IN)     -  Should text be displayed as hyperlink
  70. '            NewWindow(IN) -  Should this be displayed in a separate browser
  71. '                             window or not
  72. '
  73. ' Returns  : None
  74. ' this is broken
  75. '----------------------------------------------------------------------------
  76. Function ServeElementBlock(Container, EmptyMsg, Icons, Links, NewWindow)
  77.     on error resume next
  78.     Dim objElements
  79.     Dim objItem
  80.     Dim arrTitle()
  81.     Dim arrURL()
  82.     Dim arrHelpText()
  83.     Dim arrIconPath()
  84.     Dim blnWroteElement
  85.     Dim blnEnabled
  86.     Dim i
  87.  
  88.     Set objElements = GetElements(Container)
  89.         
  90.     ReDim arrTitle(objElements.Count)
  91.     ReDim arrURL(objElements.Count)
  92.     ReDim arrHelpText(objElements.Count)
  93.     ReDim arrIconPath(objElements.Count)
  94.  
  95.     i = 0
  96.     blnWroteElement = False
  97.         
  98.     Response.Write("<table class=ResourcesBody border=0 width=95% cellspacing=0>"+vbCrLf)
  99.     Response.Flush
  100.  
  101.     For Each objItem in objElements
  102.             
  103.         Err.Clear
  104.         'Call SA_TraceOut(SA_GetScriptFileName(), "Found resource: " + objItem.GetProperty("ElementID"))
  105.         arrIconPath(i) = m_VirtualRoot + objItem.GetProperty("ElementGraphic")
  106.         Response.Write("<tr nowrap>"+vbCrLf)
  107.                 
  108.         Dim sResourceURL
  109.  
  110.         sResourceURL = objItem.GetProperty("URL")
  111.         If ( Len(Trim(sResourceURL)) > 0 ) Then
  112.             '
  113.             ' Execute the embedded HTML page
  114.             '
  115.             'Call SA_TraceOut(SA_GetScriptFileName(), "Executing Embedded URL: (" + m_VirtualRoot + sResourceURL + ")")
  116.             Server.Execute(m_VirtualRoot + sResourceURL)
  117.             blnWroteElement = True
  118.         End If
  119.                     
  120.         Response.Write("</tr>"+vbCrLf)
  121.         i = i + 1
  122.     Next
  123.         
  124.     Set objElements = Nothing
  125.     Set objItem = Nothing
  126.         
  127.     If Not blnWroteElement Then
  128.         Response.Write("<tr>"+vbCrLf)
  129.         Response.Write("<td width=30 height=28 colspan=2 valign=middle> </td>"+vbCrLf)
  130.         Response.Write("<td width=25 height=28 valign=middle> </td>"+vbCrLf)
  131.         Response.Write("<td width=314 height=28 valign=middle class=Resource>"+vbCrLf)
  132.         Response.Write(EmptyMsg+vbCrLf)
  133.         Response.Write("</td>"+vbCrLf)
  134.         Response.Write("</tr>"+vbCrLf)
  135.     End If
  136.         
  137.     Response.Write("</table>"+vbCrLf)
  138.     Response.Flush
  139. End Function
  140.  
  141.  
  142.  
  143.  
  144. %>
  145.